jQuery(document).ready(function(){
								
	///// TRANSFORM CHECKBOX /////							
	jQuery('input:checkbox').uniform();
	
	///// LOGIN FORM SUBMIT /////
	jQuery('#login').submit(function(){
		
		var username=jQuery('#username').val();
		var password=jQuery('#password').val();
		if(username != '' && password != '') {
			$.ajax({
				url:'/employee/login',
				type:'POST',
				async:true,
				data:{
					username:username,password:password
				},
				dataType:'json',
				success:function(data){
					if(data.status=='fail'){
						jQuery('.nopassword').fadeIn().find('.userlogged h4, .userlogged a span').text(username);
						jQuery('.nousername,.username').hide();
					}else{
						window.location.href="/employee/profile";
					}
				}
			});
		}
		return false;
	});
	
	///// ADD PLACEHOLDER /////
	jQuery('#username').attr('placeholder','请输入帐号');
	jQuery('#password').attr('placeholder','请输入密码');

	jQuery('#myCarousel').carousel({
            interval: 2000
        });
});
